home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / wvemxrax / wavmixer.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-11-21  |  8.6 KB  |  299 lines

  1. VERSION 5.00
  2. Object = "{BB5A7441-7659-11D2-BE85-5254ABDD6677}#1.0#0"; "WAVMIXER.OCX"
  3. Begin VB.Form Form1 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Wave Mixer ActiveX Demo"
  6.    ClientHeight    =   4008
  7.    ClientLeft      =   36
  8.    ClientTop       =   324
  9.    ClientWidth     =   5424
  10.    Icon            =   "WavMixer_VB5Demo.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   4008
  15.    ScaleWidth      =   5424
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin VB.CommandButton Command6 
  18.       Caption         =   "Resume"
  19.       Height          =   372
  20.       Left            =   4080
  21.       TabIndex        =   20
  22.       Top             =   3480
  23.       Width           =   1212
  24.    End
  25.    Begin VB.CommandButton Command5 
  26.       Caption         =   "Pause"
  27.       Height          =   372
  28.       Left            =   2760
  29.       TabIndex        =   19
  30.       Top             =   3480
  31.       Width           =   1212
  32.    End
  33.    Begin VB.CommandButton Command4 
  34.       Caption         =   "Stop"
  35.       Height          =   372
  36.       Left            =   1440
  37.       TabIndex        =   18
  38.       Top             =   3480
  39.       Width           =   1212
  40.    End
  41.    Begin VB.HScrollBar HScroll6 
  42.       Height          =   252
  43.       Left            =   840
  44.       Max             =   100
  45.       TabIndex        =   16
  46.       Top             =   3120
  47.       Value           =   100
  48.       Width           =   4452
  49.    End
  50.    Begin VB.HScrollBar HScroll5 
  51.       Height          =   252
  52.       Left            =   840
  53.       Max             =   100
  54.       TabIndex        =   13
  55.       Top             =   480
  56.       Value           =   100
  57.       Width           =   2652
  58.    End
  59.    Begin VB.CommandButton Command3 
  60.       Caption         =   "Play"
  61.       Height          =   372
  62.       Left            =   120
  63.       TabIndex        =   12
  64.       Top             =   3480
  65.       Width           =   1212
  66.    End
  67.    Begin VB.CommandButton Command2 
  68.       Caption         =   "Channel 1"
  69.       Height          =   852
  70.       Left            =   3600
  71.       TabIndex        =   11
  72.       Top             =   1320
  73.       Width           =   1692
  74.    End
  75.    Begin VB.CommandButton Command1 
  76.       Caption         =   "Channel 0"
  77.       Height          =   852
  78.       Left            =   3600
  79.       TabIndex        =   10
  80.       Top             =   240
  81.       Width           =   1692
  82.    End
  83.    Begin VB.HScrollBar HScroll4 
  84.       Height          =   252
  85.       Left            =   840
  86.       Max             =   100
  87.       TabIndex        =   8
  88.       Top             =   1920
  89.       Value           =   100
  90.       Width           =   2652
  91.    End
  92.    Begin VB.HScrollBar HScroll3 
  93.       Height          =   252
  94.       Left            =   840
  95.       Max             =   100
  96.       TabIndex        =   5
  97.       Top             =   1560
  98.       Value           =   100
  99.       Width           =   2652
  100.    End
  101.    Begin VB.HScrollBar HScroll2 
  102.       Height          =   252
  103.       Left            =   840
  104.       Max             =   100
  105.       TabIndex        =   3
  106.       Top             =   840
  107.       Value           =   100
  108.       Width           =   2652
  109.    End
  110.    Begin VB.HScrollBar HScroll1 
  111.       Height          =   252
  112.       Left            =   840
  113.       Max             =   100
  114.       TabIndex        =   0
  115.       Top             =   2760
  116.       Value           =   100
  117.       Width           =   4452
  118.    End
  119.    Begin VB.Label Label9 
  120.       Caption         =   "Right:"
  121.       Height          =   252
  122.       Left            =   120
  123.       TabIndex        =   17
  124.       Top             =   3120
  125.       Width           =   612
  126.    End
  127.    Begin VB.Label Label8 
  128.       Caption         =   "Left:"
  129.       Height          =   252
  130.       Left            =   120
  131.       TabIndex        =   15
  132.       Top             =   2760
  133.       Width           =   612
  134.    End
  135.    Begin VB.Label Label7 
  136.       Caption         =   "Volume:"
  137.       Height          =   252
  138.       Left            =   120
  139.       TabIndex        =   14
  140.       Top             =   2400
  141.       Width           =   1332
  142.    End
  143.    Begin VB.Label Label6 
  144.       Caption         =   "Right:"
  145.       Height          =   252
  146.       Left            =   120
  147.       TabIndex        =   9
  148.       Top             =   1920
  149.       Width           =   612
  150.    End
  151.    Begin VB.Label Label5 
  152.       Caption         =   "Left:"
  153.       Height          =   252
  154.       Left            =   120
  155.       TabIndex        =   7
  156.       Top             =   1560
  157.       Width           =   612
  158.    End
  159.    Begin VB.Label Label4 
  160.       Caption         =   "Channel 1 Volume:"
  161.       Height          =   252
  162.       Left            =   120
  163.       TabIndex        =   6
  164.       Top             =   1200
  165.       Width           =   1332
  166.    End
  167.    Begin VB.Label Label3 
  168.       Caption         =   "Right:"
  169.       Height          =   252
  170.       Left            =   120
  171.       TabIndex        =   4
  172.       Top             =   840
  173.       Width           =   612
  174.    End
  175.    Begin VB.Label Label2 
  176.       Caption         =   "Left:"
  177.       Height          =   252
  178.       Left            =   120
  179.       TabIndex        =   2
  180.       Top             =   480
  181.       Width           =   612
  182.    End
  183.    Begin VB.Label Label1 
  184.       Caption         =   "Channel 0 Volume:"
  185.       Height          =   252
  186.       Left            =   120
  187.       TabIndex        =   1
  188.       Top             =   120
  189.       Width           =   1332
  190.    End
  191.    Begin WaveMixer.WaveMixer WaveMixer1 
  192.       Left            =   2880
  193.       Top             =   2280
  194.       LeftVolume      =   100
  195.       RightVolume     =   100
  196.       IgnoreChannelVolume=   0   'False
  197.       Stereo          =   -1  'True
  198.       SamplesPerSec   =   22050
  199.       BitsPerSample   =   16
  200.       StartPos        =   0
  201.       Loop            =   -1  'True
  202.       ExtendWidth     =   572
  203.       ExtendHeight    =   572
  204.    End
  205. Attribute VB_Name = "Form1"
  206. Attribute VB_GlobalNameSpace = False
  207. Attribute VB_Creatable = False
  208. Attribute VB_PredeclaredId = True
  209. Attribute VB_Exposed = False
  210. Sub updatevolume()
  211.     WaveMixer1.LeftVolume = HScroll1
  212.     WaveMixer1.RightVolume = HScroll6
  213.     WaveMixer1.ChannelLeftVolume(0) = HScroll5
  214.     WaveMixer1.ChannelRightVolume(0) = HScroll2
  215.     WaveMixer1.ChannelLeftVolume(1) = HScroll3
  216.     WaveMixer1.ChannelRightVolume(0) = HScroll4
  217.     WaveMixer1.ChannelMute(1) = False
  218.     WaveMixer1.ChannelMute(0) = False
  219.     WaveMixer1.Loop = True
  220. End Sub
  221. Private Sub Command1_Click()
  222.     WaveMixer1.Loop = False
  223.     WaveMixer1.ChannelMute(1) = True
  224.     WaveMixer1.ChannelMute(0) = False
  225.     WaveMixer1.LeftVolume = 100
  226.     WaveMixer1.RightVolume = 100
  227.     WaveMixer1.ChannelLeftVolume(0) = 100
  228.     WaveMixer1.ChannelRightVolume(0) = 100
  229.     WaveMixer1.Play
  230. End Sub
  231. Private Sub Command2_Click()
  232.     WaveMixer1.Loop = False
  233.     WaveMixer1.ChannelMute(1) = False
  234.     WaveMixer1.ChannelMute(0) = True
  235.     WaveMixer1.LeftVolume = 100
  236.     WaveMixer1.RightVolume = 100
  237.     WaveMixer1.ChannelLeftVolume(1) = 100
  238.     WaveMixer1.ChannelRightVolume(1) = 100
  239.     WaveMixer1.Play
  240. End Sub
  241. Private Sub Command3_Click()
  242.     updatevolume
  243.     WaveMixer1.Play
  244. End Sub
  245. Private Sub Command4_Click()
  246.     updatevolume
  247.     WaveMixer1.Stop
  248. End Sub
  249. Private Sub Command5_Click()
  250.     updatevolume
  251.     WaveMixer1.Pause
  252. End Sub
  253. Private Sub Command6_Click()
  254.     updatevolume
  255.     WaveMixer1.Resume
  256. End Sub
  257. Private Sub Form_Load()
  258.     WaveMixer1.AddChannel
  259.     WaveMixer1.AddChannel
  260.     WaveMixer1.ReadChannelWave 0, App.Path & "\0.wav"
  261.     WaveMixer1.ReadChannelWave 1, App.Path & "\1.wav"
  262. End Sub
  263. Private Sub HScroll1_Change()
  264.     WaveMixer1.LeftVolume = HScroll1
  265. End Sub
  266. Private Sub HScroll1_Scroll()
  267.     WaveMixer1.LeftVolume = HScroll1
  268. End Sub
  269. Private Sub HScroll2_Change()
  270.     WaveMixer1.ChannelRightVolume(0) = HScroll2
  271. End Sub
  272. Private Sub HScroll2_Scroll()
  273.     WaveMixer1.ChannelRightVolume(0) = HScroll2
  274. End Sub
  275. Private Sub HScroll3_Change()
  276.     WaveMixer1.ChannelLeftVolume(1) = HScroll3
  277. End Sub
  278. Private Sub HScroll3_Scroll()
  279.     WaveMixer1.ChannelLeftVolume(1) = HScroll3
  280. End Sub
  281. Private Sub HScroll4_Change()
  282.     WaveMixer1.ChannelRightVolume(1) = HScroll4
  283. End Sub
  284. Private Sub HScroll4_Scroll()
  285.     WaveMixer1.ChannelRightVolume(1) = HScroll4
  286. End Sub
  287. Private Sub HScroll5_Change()
  288.     WaveMixer1.ChannelLeftVolume(0) = HScroll5
  289. End Sub
  290. Private Sub HScroll5_Scroll()
  291.     WaveMixer1.ChannelLeftVolume(0) = HScroll5
  292. End Sub
  293. Private Sub HScroll6_Change()
  294.     WaveMixer1.RightVolume = HScroll6
  295. End Sub
  296. Private Sub HScroll6_Scroll()
  297.     WaveMixer1.RightVolume = HScroll6
  298. End Sub
  299.